package com.jt.demo4;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class User {
    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        Dog dog = context.getBean(Dog.class);
        Dog dog1 = context.getBean(Dog.class);
        Dog dog2 = new Dog();
        dog.hello();
        dog1.hello();
        dog2.hello();
    }
}
